package com.gohome.gohomechat.utils;

import android.os.Bundle;

import com.easemob.chat.EMChat;
import com.easemob.chat.EMContactListener;
import com.easemob.chat.EMContactManager;

import java.util.List;

/**
 * Created by dllo on 16/3/3.
 */
public class StateResult {
    public static void statelistener(){
        EMContactManager.getInstance().setContactListener(new EMContactListener() {
            @Override
            public void onContactAgreed(String username) {
                //好友请求被同意


            }

            @Override
            public void onContactRefused(String username) {
                //好友请求被拒绝


            }

            @Override
            public void onContactInvited(String username, String reason) {
                //收到好友邀请


            }

            @Override
            public void onContactDeleted(List<String> usernameList) {
                //被删除时回调此方法

            }


            @Override
            public void onContactAdded(List<String> usernameList) {
                //增加了联系人时回调此方法
                ToastUtil.showToast("增加了联系人时回调此方法");
            }
        });

        EMChat.getInstance().setAppInited();
    }
}
